Empty rows/columns of the table should not have been marked as being able
authorOwen Taylor <otaylor@redhat.com>
Tue, 4 Aug 1998 14:55:04 +0000 (14:55 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Tue, 4 Aug 1998 14:55:04 +0000 (14:55 +0000)
Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>

* gtk/gtktable.[ch]: Empty rows/columns of the table
        should not have been marked as being able to shrink.
(Fixes prorlem with shrinking scrollbarless GIMP canvases)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktable.c
gtk/gtktable.h

index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index 172ab4277563e9453c79fa4fe7db2b166a6503b1..74ab1c79d8aec4b826250dc8751baff8ca768f70 100644 (file)
@@ -1,3 +1,9 @@
+Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktable.[ch]: Empty rows/columns of the table
+        should not have been marked as being able to shrink.
+       (Fixes prorlem with shrinking scrollbarless GIMP canvases)
+
 1998-08-03  Federico Mena Quintero  <federico@nuclecu.unam.mx>
 
        * gtk/gtkctree.c (gtk_ctree_find_by_row_data_custom): New public
index cae41a0c604622a3e6decbf6fa2a656ec520d953..08a27ab533218f4420e647690c9c8d77e5c61135 100644 (file)
@@ -1071,6 +1071,7 @@ gtk_table_size_allocate_init (GtkTable *table)
       table->cols[col].need_shrink = TRUE;
       table->cols[col].expand = FALSE;
       table->cols[col].shrink = TRUE;
+      table->cols[col].empty = TRUE;
     }
   for (row = 0; row < table->nrows; row++)
     {
@@ -1079,6 +1080,7 @@ gtk_table_size_allocate_init (GtkTable *table)
       table->rows[row].need_shrink = TRUE;
       table->rows[row].expand = FALSE;
       table->rows[row].shrink = TRUE;
+      table->rows[row].empty = TRUE;
     }
   
   /* Loop over all the children and adjust the row and col values
@@ -1101,6 +1103,8 @@ gtk_table_size_allocate_init (GtkTable *table)
              
              if (!child->xshrink)
                table->cols[child->left_attach].shrink = FALSE;
+             
+             table->cols[child->left_attach].empty = FALSE;
            }
          
          if (child->top_attach == (child->bottom_attach - 1))
@@ -1110,6 +1114,8 @@ gtk_table_size_allocate_init (GtkTable *table)
              
              if (!child->yshrink)
                table->rows[child->top_attach].shrink = FALSE;
+
+             table->rows[child->top_attach].empty = FALSE;
            }
        }
     }
@@ -1127,6 +1133,9 @@ gtk_table_size_allocate_init (GtkTable *table)
        {
          if (child->left_attach != (child->right_attach - 1))
            {
+             for (col = child->left_attach; col < child->right_attach; col++)
+               table->cols[col].empty = FALSE;
+
              if (child->xexpand)
                {
                  has_expand = FALSE;
@@ -1160,6 +1169,9 @@ gtk_table_size_allocate_init (GtkTable *table)
          
          if (child->top_attach != (child->bottom_attach - 1))
            {
+             for (row = child->top_attach; row < child->bottom_attach; row++)
+               table->rows[row].empty = FALSE;
+
              if (child->yexpand)
                {
                  has_expand = FALSE;
@@ -1198,10 +1210,18 @@ gtk_table_size_allocate_init (GtkTable *table)
    */
   for (col = 0; col < table->ncols; col++)
     {
-      if (table->cols[col].need_expand)
-       table->cols[col].expand = TRUE;
-      if (!table->cols[col].need_shrink)
-       table->cols[col].shrink = FALSE;
+      if (table->cols[col].empty)
+       {
+         table->cols[col].expand = FALSE;
+         table->cols[col].shrink = FALSE;
+       }
+      else
+       {
+         if (table->cols[col].need_expand)
+           table->cols[col].expand = TRUE;
+         if (!table->cols[col].need_shrink)
+           table->cols[col].shrink = FALSE;
+       }
     }
   
   /* Loop over the rows and set the expand and shrink values
@@ -1209,10 +1229,17 @@ gtk_table_size_allocate_init (GtkTable *table)
    */
   for (row = 0; row < table->nrows; row++)
     {
-      if (table->rows[row].need_expand)
-       table->rows[row].expand = TRUE;
-      if (!table->rows[row].need_shrink)
-       table->rows[row].shrink = FALSE;
+      if (table->rows[row].empty)
+       {
+         table->rows[row].expand = FALSE;
+         table->rows[row].shrink = FALSE;
+       }
+      {
+       if (table->rows[row].need_expand)
+         table->rows[row].expand = TRUE;
+       if (!table->rows[row].need_shrink)
+         table->rows[row].shrink = FALSE;
+      }
     }
 }
 
index 2c3d9059115de89deef313e37d5566d870a6aadd..e4234853ff580fcd80a08964c38a4ebd9aa7734b 100644 (file)
@@ -87,6 +87,7 @@ struct _GtkTableRowCol
   guint need_shrink : 1;
   guint expand : 1;
   guint shrink : 1;
+  guint empty : 1;
 };